<div class="modal" id="search_form_modal" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">赠送红包</h4>
            </div>
            <div class="modal-body">
                <%= render 'form' %>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-success"><i class="fa fa-fighter-jet"></i> 赠送</button>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <%= render partial: 'member/individual_credit_accounts/individual_credit_account_show_header' %>
            <div class="panel-body">
                <%= render partial: 'member/individual_credit_accounts/individual_credit_account_show_tab_header', locals: {index: 2} %>
                <%= render 'search_form' %>
                <div class="panel">
                    <div class="panel-body">
                        <div class="row">
                            <%= render partial: 'shared/index_table_entries_info', locals: {collection: @member_vouchers, model: 'voucher'} %>
                            <% if can?(:create, Member::Voucher) %>
                                <button type="button" class="btn btn-success" style="float: right" data-toggle="modal" data-target="#search_form_modal">
                                    <i class="fa fa-search-plus"></i> 赠送红包
                                </button>
                            <% end %>
                        </div>
                        <br>
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>红包别名</th>
                                <th>领取时间</th>
                                <th>使用时间</th>
                                <th>面额</th>
                                <th>类别</th>
                                <th>状态</th>
                            </tr>
                            </thead>
                            <tbody>
                            <%= render partial: 'voucher', collection: @member_vouchers, as: :voucher %>
                            </tbody>
                        </table>
                        <div class="row">
                            <%= render partial: 'shared/index_table_entries_info', locals: {collection: @member_vouchers, model: 'voucher'} %>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>

